package com.kaifamiao.mybatis.association.entity;

import java.util.Set;

public class Course {

    private Integer id ;
    private String name ;
    private Double credit ;

    // 维护从 Course 到 Student 的 一对多 关联 关系
    private Set<Student> students ; // 选择当前课程的学生

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getCredit() {
        return credit;
    }

    public void setCredit(Double credit) {
        this.credit = credit;
    }

    public Set<Student> getStudents() {
        return students;
    }

    public void setStudents(Set<Student> students) {
        this.students = students;
    }

}
